Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

Test ScheduleNewOrchestrationInstance_WithDedupeStatuses_AllowsCreationWhenInstanceDoesNotExist was failing intermittently because it checked orchestration status immediately after scheduling, before the orchestration transitioned from Pending to Running.

Changes

  • Added WaitForInstanceStartAsync before status assertion, matching the pattern used by all other similar tests in the file
createdInstanceId.Should().Be(instanceId);

// Wait for the instance to start before checking status
await server.Client.WaitForInstanceStartAsync(instanceId, default);

// Verify the instance was created and is running
OrchestrationMetadata? metadata = await server.Client.GetInstanceAsync(instanceId, false);
Original prompt

check and fix test failures in https://github.com/microsoft/durabletask-dotnet/actions/runs/20355135373/job/58488817585?pr=551


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix test failures in CI workflow Fix flaky integration test race condition in dedup status check Dec 19, 2025
Copilot AI requested a review from YunchuWang December 19, 2025 02:20
@YunchuWang YunchuWang marked this pull request as ready for review December 19, 2025 02:59
Copilot AI review requested due to automatic review settings December 19, 2025 02:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a flaky integration test by addressing a race condition where the test checked orchestration status before the instance had fully transitioned from Pending to Running.

Key Changes:

  • Added WaitForInstanceStartAsync call before status assertion in the test
  • Updated comment to reflect that the test now verifies both creation and running status

@YunchuWang YunchuWang merged commit bf93fe8 into main Dec 19, 2025
14 checks passed
@YunchuWang YunchuWang deleted the copilot/fix-test-failures branch December 19, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants